package com.example.chinesenation.Service.Impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.chinesenation.Entity.NationCityPartition;
import com.example.chinesenation.Entity.NationPartition;
import com.example.chinesenation.Mapper.NationCityPartitionMapper;
import com.example.chinesenation.Service.INationCityPartitionService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author sakuraFallingDown
 * @since 2021-03-08
 */
@Service
public class NationCityPartitionServiceImpl extends ServiceImpl<NationCityPartitionMapper, NationCityPartition> implements INationCityPartitionService {

    @Override
    public List<NationCityPartition> findByCid(String cid) {
        QueryWrapper<NationCityPartition> qw=new QueryWrapper<>();
        qw.likeRight("city",cid);
        qw.orderByDesc("total_number");
        return list(qw);
    }
}
